﻿$(function () {
    var button = $('#shareButton');
    var box = $('#shareBox');
    var form = $('#shareForm');
    button.removeAttr('href');
    button.mouseup(function (login) {
        box.toggle();
        button.toggleClass('active');
    });
    form.mouseup(function () {
        return false;
    });
    $(this).mouseup(function (login) {
        if (!($(login.target).parent('#shareButton').length > 0)) {
            button.removeClass('active');
            box.hide();
        }
    });
});
